{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<title>重置手机号码</title>
	<link rel="stylesheet" href="__CDN__/assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__CDN__/assets/css/set.css">
    <link rel="stylesheet" href="__CDN__/assets/css/lanrenzhijia.css">
	<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
	<script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
	<script src="__CDN__/assets/js/detail.js"></script>
	<script src="__CDN__/assets/js/getcode.js"></script>
</head>
<body>
	<div class="heard">
			<div class="heard_return">
				<a href="javascript:history.back();"><img src="__CDN__/assets/img/bikebi/return.png"></a>
			</div>
			<div class="heard_title">
				<p>重置手机号码</p>
			</div>
	</div>

	<div class="edit_form">
		<form method="post" action=""  onsubmit="return tj_form(this);" name="form4">
			<div class="form_one">登录密码<input type="text" name="password" placeholder="请输入登录密码"  id="password"></div>
			<div class="form_one" style="display: none;">验&nbsp;证&nbsp;码<input type="text" value="123" name="captcha" placeholder="请输入验证码"  id="code">

				<a href="javascript:void(0);" id="getcode" onclick="getCode(this)">获取验证码</a>

				<a id="regetcode" style="display: none;" type="button"><span id="second">60</span><span>秒后重发</span></a>
			</div>
			<div style="height: 35px;width: 100%;"></div>
			<div class="form_one">设置新手机号码<input type="text" name="mobile" placeholder="请输入新手机号码"  id="tel"></div>
			<div class="form_one">确认新手机号码<input type="text" name="confirm_mobile" placeholder="请确认新手机号码"  id="checktel"></div>
			<div class="form_submit">
				<input type="submit" name="" class="btn btn-defaul" style="background-color:#4782DB" value="提交" id="btn">
			</div>
		</form>
	</div>

    <script>
    	  function tj_form(obj){
            
    	  var check_res = Check_edittel_form();  //验证表单
            if(check_res == false){
                return false;
               }
            var url = '{:url("api/user/changemobile")}'; 
            var back= '{:url("index/user/index")}';

            $.ajax({
            	url:url,
            	type:'post',
            	data:$(obj).serialize(),
            	success:function(res){
            		
                   if(res.code==1){

                      alert('重置手机号码成功');
                      location.href=back;

                   }else{
                   	alert(res.msg);
                   }
            	},
            	dataType:'json'

            }); 

             return false;
    	  }



    </script>




</body>
</html>